<?php
class Frontend_Table_Row_Category extends Custom_Model_Table_Row_Abstract
{
    public function isRoot()
    {
        if (0 == $this->getRow()->parent_id){
            return true;
        } else {
            return false;
        }
    }

    public function setScore($value)
    {
        if (null == $value || 0 > $value) {
            $value = 1;
        }
        $this->getRow()->scores = $this->getRow()->scores + $value;
    }
}